package com.example.weatherforecast.whtrcdn.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.example.weatherforecast.whtrcdn.fragment.WeatherInfoFragment

class WeatherInfoViewPagerAdapter(fragmentActivity: FragmentActivity, val weatherInfoList: List<WeatherInfoFragment>):
    FragmentStateAdapter(fragmentActivity) {

    override fun getItemCount(): Int {
        return weatherInfoList.size
    }

    override fun createFragment(position: Int): Fragment {
        return weatherInfoList[position]
    }
}